local skynet = require "skynet"
local protobuf = require "protobuf"

local function loadProtobuf(fileName)
	local addr = io.open(fileName,"rb")
	local buffer = addr:read "*a"
	addr:close()
	protobuf.register(buffer)
end

skynet.start(function()
	loadProtobuf('game/proto/MessageType.pb')
	loadProtobuf('game/proto/ResponseCode.pb')
	loadProtobuf('game/proto/GameProtocol.pb')
	loadProtobuf('game/proto/Login.pb')
end)
